#ifndef ENTITY_H
#define ENTITY_H

#include <string>

class Entity
{
	protected:
		float x;
		float y;
		float rotation;
		std::string type;
		std::string name;
	public:
		Entity(float x, float y, float rotation, std::string type, std::string name);
		float getX () { return x; }
		void setX (float x) { Entity::x = x; }
		float getY () { return y; }
		void setY (float y) { Entity::y = y; }
		float getRotation () { return rotation; }
		void setRotation (float rotation) { Entity::rotation = rotation; }
		std::string getType() { return type; }
		std::string getName() { return name; }
};

Entity::Entity (float x, float y, float rotation, std::string type, std::string name) 
{
	if(x > 1 || x < -1 || 
		y > 1 || y < -1)
	{
		throw "fail constraint: -1 <= x,y <= 1";
	}
	Entity::x = x; 
	Entity::y = y; 
	Entity::rotation = rotation; 
	Entity::type = type;
	Entity::name = name;
}

#endif